home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / vxbase.zip / VXFORM2.FRM (.txt) < prev    next >
Visual Basic Form  |  1992-03-06  |  12KB  |  254 lines

  1. VXFORM2
  2. Aircraft Types
  3. Form3
  4. Label1
  5.     Type Code
  6. Tms Rmn
  7. TypeCode
  8. Label2
  9. Description
  10. Tms Rmn
  11. TypeDesc
  12. TypeSave
  13. &Save
  14. TypeCancel
  15. &Cancel
  16. TypeAdd
  17. TypeDelete
  18. &Delete
  19. TypeNext
  20. &Next
  21. TypePrev
  22.     &Previous
  23. TypeBrowse
  24. &Browse
  25. TypeExit
  26. E&xit
  27. Label3
  28. Status
  29. Tms Rmn
  30. TypeStatus
  31.     Form_Load
  32. vxSelectDbfa
  33. AirtypesDbf
  34. Form2Active
  35. TypeReturn
  36. BROWSE_ADD
  37. TypeDataClear
  38. TypeStatusm
  39. TypeSave
  40. EnabledJ
  41. TypeCancel:
  42. TypeAddy
  43. FALSEU
  44. TypeDelete
  45. BROWSE_EDIT
  46. TypeDataLoad
  47. vxRecNo
  48. TypeCode
  49. TypeDesc
  50. vxUnlockd
  51. CursorWait
  52. vxfield
  53. CursorArrow
  54. TypeCode_KeyPress
  55. KeyAsciis
  56. TypeSave_Click
  57. SeekKey
  58. EmptyString
  59. vxSeek
  60. vxAppendBlank
  61. vxReplString
  62. vxWrite:
  63. TypeAdd_Click
  64. TypeBrowse_Click
  65. VXFORM2
  66. Visible
  67. BROWSE_USER3
  68. BrowseTypes
  69. TypeCancel_Click
  70. TypeDelete_Click&
  71. vxLockRecord
  72. vxDeleteRec
  73. TypeExit_Click?
  74. TypeNext_ClickZ
  75. vxSkip
  76. TypeNext
  77. TypePrev
  78. TypeBrowseQ
  79. vxEof
  80.     vxDeleted
  81. vxBottomx
  82. TypePrev_Click
  83. vxBofc
  84. vxTop
  85. TypeCode_GotFocus
  86. vxCtlLength4
  87. TypeDesc_GotFocus
  88. Form_Unload
  89. Cancel
  90. vxClose
  91. vxWindowDereg
  92. VXFORM1
  93.     OpenTypesW
  94. OpenCust
  95.     PackFiles
  96. TestCreate$
  97. TestCopy
  98. TestDataCopy
  99. TypeDesc_KeyPresst
  100. Form_Paintf
  101. vxFormFrame
  102. vxCtlStyle
  103.     VX_RECESS
  104. VX_RAISE
  105. BROWSE_DELETE
  106. Form_Load
  107.  On form load analyze results of browse return
  108.  ALWAYS select the database as the first statement
  109.  in the FORM_LOAD procedure. This registers thee
  110.  select area with the vxBase System Task manager.
  111.  You MUST also select the database as the firstr
  112.  statement in the FORM_PAINT procedure. This
  113.  registers the select area with the vxBase Taskr
  114.  Window manager. If you do these two things, vxBase
  115.  will ensure smooth multiwindow operation in the
  116.  task, and also smooth multitasking operation if you
  117.  wish to run more than one Visual Basic vxBase program
  118.  at the same time (or multiple instances of the same
  119.  Visual Basic vxBase program.e
  120. Record addition request"
  121.  if user pressed ENTER then file is positioned
  122.  at current record and the record number isn
  123.  returned in TypeReturn. In this case we assume
  124.  he wants to edit that record.
  125.  call general proc to load controls-
  126. Edit record 
  127. TypeDataClear
  128.  Clear Form in preparation for add or after successful delete
  129.  ensure database unlocked-
  130. TypeDataLoad
  131.  Load data from current record
  132.  ensure data entry enabled
  133. category
  134. catname"
  135.  unlock for multiusers
  136.  In a multiuser or multitasking environment, the file-
  137.  should be unlocked after you have extracted the data-
  138.  you are interested in. See the "MultiTasking andd
  139.  MultiUser Considerations" section in the manual for
  140.  a full discussion.a
  141. TypeCode_KeyPress
  142.  Convert type code to uppercase as it is being entered
  143.  also convert enter key to tab
  144. {Tab}"
  145. TypeSave_Click
  146.  Validate data when save button is pressed
  147.  verify something in the field
  148. Field cannot be empty"
  149.  note that if this was a real application we wouldn't-
  150.  allow a change to the type code if the record was being
  151.  edited unless we were prepared to cross reference all
  152.  of the other files affected by a change. We alsoe
  153.  wouldn't allow the onscreen edit in the browse. This is
  154.  just a sample application.n
  155.  verify unique key if adding
  156. Duplicate Key on Add
  157.  Data passed. Put it away
  158.  notice the brackets around the control property
  159.  below which gets at the data contained thereiny
  160. category
  161. catname"
  162.  Update status box
  163. Record "
  164.  appended"
  165. Record "
  166.  saved
  167.  Update Button Status
  168.  ensure database unlockedd
  169. TypeAdd_Click
  170.  clear form for addition of new record
  171. Record Addition Request"
  172.  ensure data entry enabled
  173.  reset the buttons
  174. TypeBrowse_Click
  175.  current form is unloaded because if needed again
  176.  the form_load proc must be invoked to reset the
  177.  control datad
  178.  so we don't close files
  179.  when we unload the form
  180. TypeCancel_Click
  181.  Clear form data and reset button status
  182. Operation cancelled"
  183.  we must disable data entry because the user
  184.  could enter a new record in the blank boxes
  185.  and then press the Add button. The TypeAdd_Click
  186.  routine clears the form boxes again prior tol
  187.  accepting input so the user's work would be lost
  188.  and he would be mad.h
  189. TypeDelete_Click
  190.  get user confirmation of delete
  191. Confirm Delete
  192.  Deleted
  193. Delete failed"
  194. Delete cancelled
  195. TypeExit_Click
  196.  unloading the form performs cleanup for us
  197. TypeNext_Click
  198.  skip forward one record
  199.  if skip error, only allow exit-
  200. Error on Skip Next. Try Reindex.
  201.  test for end of file 
  202. End of File!
  203. Skipped to record 
  204. TypePrev_Click
  205.  skip back one record
  206.  if skip error, only allow exit
  207. Error on Skip Previous. Try Reindex.
  208.  test for beginning of filer
  209. Beginning of File!
  210. Skipped to record 
  211. TypeCode_GotFocus
  212.  set up text length limit
  213. category#
  214. TypeDesc_GotFocus
  215.  set up text length limit
  216. catname"#
  217. Form_Unload
  218.  close types file and reset table
  219.  and reenable menu items if we're
  220.  NOT being unloaded by the Browse button
  221.  IT IS IMPORTANT THAT YOU DEREGISTER
  222.  THE WINDOW THAT THE FILE SELECT
  223.  AREA WAS ATTACHED TO IN THE FORM_UNLOAD PROC.
  224.  IF YOU DON'T, YOU ARE LIABLE TO RUN OUT OFO
  225.  TASK-WINDOW ENTRIES (96 in all are allowed)
  226.  If BrowseTypes is invoked by clicking the Browse-
  227.  button on the edit form, we don't want to close
  228.  the files. If we get here for any other reasone
  229.  (like picking the exit button on the form oro
  230.  using the System menu to close the window) then
  231.  we close the files, release the table memory, and
  232.  reshow the menu form so the user can pick something
  233.  else.
  234. TypeDesc_KeyPress
  235.  convert ENTER to tab-
  236. {Tab}"
  237. Form_Paint
  238.  ALWAYS select the database as the first statement
  239.  in the FORM_LOAD procedure. This registers thee
  240.  select area with the vxBase System Task manager.
  241.  You MUST also select the database as the firstr
  242.  statement in the FORM_PAINT procedure. This
  243.  registers the select area with the vxBase Taskr
  244.  Window manager. If you do these two things, vxBase
  245.  will ensure smooth multiwindow operation in the
  246.  task, and also smooth multitasking operation if you
  247.  wish to run more than one Visual Basic vxBase program
  248.  at the same time (or multiple instances of the same
  249.  Visual Basic vxBase program.e
  250.  paint three dimensional controls-
  251.  if delete request from browse, do it now-
  252.  because we must let enhanced controls
  253.  paint before asking for delete confirmation
  254.